home *** CD-ROM | disk | FTP | other *** search
- Path: news.join.ad.jp!wnoc-tyo-news!spinnews!spinchb!okigw!okigw2!aoi!aoi!sai
- From: sai@okilab.oki.co.jp (Cui Jin)
- Newsgroups: comp.lang.c++
- Subject: calling a function in library compiled with C
- Date: 20 Feb 96 15:47:09
- Organization: Oki Electric Industry Co.,Ltd., Minato-ku, Tokyo, Japan.
- Distribution: comp
- Message-ID: <SAI.96Feb20154709@jasmine.okilab.oki.co.jp>
- Reply-To: sai@okilab.oki.co.jp
- NNTP-Posting-Host: jasmine.okilab.oki.co.jp
-
-
- My program:
- -----------
- .......
-
- 16 class dict {
- 17 char* fileName;
- 18 int fpd;
- 19 public:
- 20 int open(char*, int);
- 21 void close(int);
- 22 };
- 23
- 24 int
- 25 dict::open(char* fileName, int fpd)
- 26 {
- 27 cout << "fileName = " << fileName << "\n";
- 28 if((fpd = cbopen(fileName)) == NULL)
- 29 { ^^^^^^^^^^^^^^^^
- ....... THIS IS A FUNCTION COMPILED WITH C.
-
-
- The function cbopen in library compiled with C:
- -----------------------------------------------
-
- int cbopen(CBname)
- char *CBname;
- {
- .......
-
-
-
- Comply result:
- --------------
- % make
- c++ -I./inc -I./../CBMS/lib/inc -g -c ./main.cc -o ./obj/main.o
- ./main.cc: In method `int dict::open(char *, int)':
- ./main.cc:28: warning: implicit declaration of function `int cbopen(...)'
-
-
- !!! The compiled program can work normally !!!
- ----------------------------------------------
-
- HELP! HELP! HELP! HELP! HELP! HELP! HELP! HELP! HELP! HELP!
-
- Could anyone teach me the meaning of the warning message, and
- point me a way to modify my C++ program and make compile can be
- completed without _warning message_.
-
- Thanks in advance.
-
- --
- Jin Cui
-